Optimal. Leaf size=44 \[ -\frac {1}{2} \tanh ^{-1}\left (\frac {1}{2} \sqrt {3-\cos (x)}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {3-\cos (x)}}{\sqrt {2}}\right )}{\sqrt {2}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {2800, 841,
1180, 212} \begin {gather*} -\frac {1}{2} \tanh ^{-1}\left (\frac {1}{2} \sqrt {3-\cos (x)}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {3-\cos (x)}}{\sqrt {2}}\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 841
Rule 1180
Rule 2800
Rubi steps
\begin {align*} \int \frac {\cot (x)}{\sqrt {3-\cos (x)}} \, dx &=-\text {Subst}\left (\int \frac {x}{\sqrt {3+x} \left (1-x^2\right )} \, dx,x,-\cos (x)\right )\\ &=-\left (2 \text {Subst}\left (\int \frac {-3+x^2}{-8+6 x^2-x^4} \, dx,x,\sqrt {3-\cos (x)}\right )\right )\\ &=-\text {Subst}\left (\int \frac {1}{2-x^2} \, dx,x,\sqrt {3-\cos (x)}\right )-\text {Subst}\left (\int \frac {1}{4-x^2} \, dx,x,\sqrt {3-\cos (x)}\right )\\ &=-\frac {1}{2} \tanh ^{-1}\left (\frac {1}{2} \sqrt {3-\cos (x)}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {3-\cos (x)}}{\sqrt {2}}\right )}{\sqrt {2}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.08, size = 44, normalized size = 1.00 \begin {gather*} -\frac {1}{2} \tanh ^{-1}\left (\frac {1}{2} \sqrt {3-\cos (x)}\right )-\frac {\tanh ^{-1}\left (\frac {\sqrt {3-\cos (x)}}{\sqrt {2}}\right )}{\sqrt {2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(80\) vs.
\(2(33)=66\).
time = 0.16, size = 81, normalized size = 1.84
method | result | size |
default | \(-\frac {\sqrt {2}\, \arctanh \left (\frac {\left (2+\cos \left (\frac {x}{2}\right )\right ) \sqrt {2}}{\sqrt {2 \left (\sin ^{2}\left (\frac {x}{2}\right )\right )+2}}\right )}{4}-\frac {\sqrt {2}\, \arctanh \left (\frac {-\sqrt {2}\, \cos \left (\frac {x}{2}\right )+2 \sqrt {2}}{\sqrt {2 \left (\sin ^{2}\left (\frac {x}{2}\right )\right )+2}}\right )}{4}-\frac {\arctanh \left (\frac {2}{\sqrt {2 \left (\sin ^{2}\left (\frac {x}{2}\right )\right )+2}}\right )}{2}\) | \(81\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.49, size = 63, normalized size = 1.43 \begin {gather*} \frac {1}{4} \, \sqrt {2} \log \left (-\frac {\sqrt {2} - \sqrt {-\cos \left (x\right ) + 3}}{\sqrt {2} + \sqrt {-\cos \left (x\right ) + 3}}\right ) - \frac {1}{4} \, \log \left (\sqrt {-\cos \left (x\right ) + 3} + 2\right ) + \frac {1}{4} \, \log \left (\sqrt {-\cos \left (x\right ) + 3} - 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 77 vs.
\(2 (33) = 66\).
time = 0.50, size = 77, normalized size = 1.75 \begin {gather*} \frac {1}{8} \, \sqrt {2} \log \left (\frac {\cos \left (x\right )^{2} + 4 \, {\left (\sqrt {2} \cos \left (x\right ) - 5 \, \sqrt {2}\right )} \sqrt {-\cos \left (x\right ) + 3} - 18 \, \cos \left (x\right ) + 49}{\cos \left (x\right )^{2} - 2 \, \cos \left (x\right ) + 1}\right ) + \frac {1}{4} \, \log \left (-\frac {4 \, \sqrt {-\cos \left (x\right ) + 3} + \cos \left (x\right ) - 7}{\cos \left (x\right ) + 1}\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\cot {\left (x \right )}}{\sqrt {3 - \cos {\left (x \right )}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 68 vs.
\(2 (33) = 66\).
time = 0.47, size = 68, normalized size = 1.55 \begin {gather*} \frac {1}{4} \, \sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 2 \, \sqrt {-\cos \left (x\right ) + 3} \right |}}{2 \, {\left (\sqrt {2} + \sqrt {-\cos \left (x\right ) + 3}\right )}}\right ) - \frac {1}{4} \, \log \left (\sqrt {-\cos \left (x\right ) + 3} + 2\right ) + \frac {1}{4} \, \log \left (-\sqrt {-\cos \left (x\right ) + 3} + 2\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.02 \begin {gather*} \int \frac {\mathrm {cot}\left (x\right )}{\sqrt {3-\cos \left (x\right )}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________